package com.applink.sell_proof.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ListView;

public class MyListView extends ListView {

	public MyListView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public MyListView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public MyListView(Context context) {
		super(context);
	}

	public boolean onTouchEvent(MotionEvent event) {
		if (event.getAction() == MotionEvent.ACTION_DOWN) {
			this.getParent().requestDisallowInterceptTouchEvent(true);
		} else if (event.getAction() == MotionEvent.ACTION_UP) {
			this.getParent().requestDisallowInterceptTouchEvent(false);
		}
		super.onTouchEvent(event);
		return true;
	}

}
